package br.com.naybee.framework.client.utils;

import br.com.naybee.framework.client.models.ModelError;

public class NAYException extends RuntimeException {

	private static final long serialVersionUID = 911127766996415728L;

	private ModelError modelError;

	private String details;

	public NAYException(ModelError modelError) {
		super(modelError.getMessage());
		this.modelError = modelError;
	}

	public NAYException(ModelError modelError, String details) {
		this(modelError);
		this.details = details;
	}

	public ModelError getModelError() {
		return modelError;
	}

	public String getDetails() {
		return details;
	}
}
